package com.junhong.service.impl;

import java.io.Serializable;
import java.util.List;

import javax.annotation.Resource;
import javax.transaction.Transactional;

import org.springframework.stereotype.Service;

import com.junhong.dao.StudentDao;
import com.junhong.entity.Student;
import com.junhong.service.StudentService;

@Service("studentService")
@Transactional
public class StudentServiceImpl implements StudentService {

	@Resource
	private StudentDao studentDao;
	
	@Override
	public void add(Student student) {
		studentDao.add(student);
	}

	@Override
	public void update(Student student) {
		studentDao.update(student);
	}

	@Override
	public void delete(Student student) {
		studentDao.delete(student);
	}

	@Override
	public List<Student> find() {
		return studentDao.find();
	}

	@Override
	public List<Student> find(Integer pos, Integer rows) {
		return studentDao.find(pos, rows);
	}

	@Override
	public Student getById(Serializable id) {
		return studentDao.getById(id);
	}

	@Override
	public long count() {
		return studentDao.count();
	}

}
